home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93a.txt
/
000065_icon-group-sender _Sun Feb 14 07:05:44 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1993-04-21
|
3KB
Received: by cheltenham.cs.arizona.edu; Sun, 14 Feb 1993 14:09:12 MST
Date: 14 Feb 93 07:05:44 GMT
From: digex.com!digex.com!not-for-mail@uunet.uu.net (Pat)
Organization: UDSI
Subject: novicey beginner question
Message-Id: <1lkr08INNcn7@access.digex.com>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
I am just starting out learning ICON and am having a tough time
trying to make something work. I realize this is a real undergraddy
type question, but I am taking a night course, and the professor is
not available.
I am trying to write a procedure that given a string looks to see
if there are any curly braces and cuts out whatever is between them.
this is what i am up to, and i am having a hard time trying to
hang it all together.
procedure foo (line)
line_ptr := 0 # initialize a line ptr
com_set := '{}' # establish a cset of the things of interest
line ? {
if not find(com_set)
then return line # if there is no curly return it
else {
temp := inline(tab(upto(comset))) #scissor out
return temp # the stuff between curlies
}
}
end # foo
this is not really right, and i thought I'd ask you all what conceptual
leap i am missing. the problem is in the temp assignment.
If i can get this darn utility routine to work, the rest of the
program should come along quite nicely.
Thank you for your time, and pardon me if this is an inappropriate
posting.
pat
Newsgroups: comp.lang.icon
Subject: novicey, beginner type question
Summary:
Followup-To:
Distribution: world
Organization: UDSI
Keywords:
Newsgroups: um.dining
Subject: test.
Summary:
Followup-To:
Distribution: um
Organization: UDSI
Keywords:
Newsgroups: alt.lang.icon
Subject: Novice beginner type question.
Summary:
Followup-To:
Distribution: world
Keywords:
I am just starting out learning ICON and am having a tough time
trying to make something work. I realize this is a real undergraddy
type question, but I am taking a night course, and the professor is
not available.
I am trying to write a procedure that given a string looks to see
if there are any curly braces and cuts out whatever is between them.
this is what i am up to, and i am having a hard time trying to
hang it all together.
procedure foo (line)
line_ptr := 0 # initialize a line ptr
com_set := '{}' # establish a cset of the things of interest
line ? {
if not find(com_set)
then return line
else {
temp := inline(tab(upto(comset)))
return temp
}
}
end # foo
this is not really right, and i thought I'd ask you all what conceptual
leap i am missing. the problem is in the temp assignment.
If i can get this darn utility routine to work, the rest of the
program should come along quite nicely.
Thank you for your time, and pardon me if this is an inappropriate
posting.
pat